package com.xwaf.platform.system.api.request.auth;

import static com.google.common.base.Preconditions.checkArgument;

import java.io.Serializable;

import org.springframework.util.StringUtils;

import lombok.Data;

@Data
public class TokenVerifyRequest implements Serializable {

	private static final long serialVersionUID = 1L;

	private String token;
	private String deviceId;

	public TokenVerifyRequest() {
	}

	public TokenVerifyRequest(Long userId, String token, String deviceId) {
		checkArgument(!StringUtils.isEmpty(token), "token参数不能为空");
		this.token = token;
		this.deviceId = deviceId;
	}

	public TokenVerifyRequest(String uid, String token, String deviceId) {
		this(Long.valueOf(uid), token, deviceId);
	}
}
